package com.example.swagger.controller;

import com.example.swagger.pojo.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@Api(tags = "测试")
@RestController
@RequestMapping("/api")
public class HelloController {


    @ApiOperation(value = "sayHelo")
    @GetMapping("/hello")
    public ResponseEntity<String> hello(String name){
        return ResponseEntity.ok("Hello"+name);
    }


    @PostMapping("save")
    @ApiOperation(value = "保存",  notes="新增结果保存", produces = "application/json")
    @ApiResponses({
            @ApiResponse(code=0,message="success"),
            @ApiResponse(code=-1,message="系统异常"),
            @ApiResponse(code=-10000,message="系统繁忙，请稍后再次操作"),
            @ApiResponse(code=3005,message="新增商户失败"),
            @ApiResponse(code=3009,message="该联系人邮箱已绑定商户:xxxxxx")
    })
    public BaseResponse batchSave(@RequestBody String req){
        return null;
    }
}
